package com.design.pattern.create.builder;

/**
 * 套餐导演类
 *
 * @author gyf
 * @create 2018-12-01 11:54
 **/
public class FruitMealController {
    public static void main(String[] args) {
        createMeal();
    }

    private static void createMeal() {
        Builder builder = new OldCustomerBuilder();
        builder.buildApple(120);
        builder.buildOrange(80);
        builder.buildBanana(40);
        FruitMeal fruitMeal = builder.getFruitMeal();
        int totalPrice = fruitMeal.cost();
        System.out.println(String.format("套餐总价:%d", totalPrice));
    }
}
